import request from '@/utils/request'

export const LineGroupApi = {
  /**
   *  线路组分页列表
   * @returns
   */
  getPage: (data) => {
    return request({
      url: '/manage/intercity/lineGroup/getPage',
      data,
      method: 'post'
    })
  },

  /**
   *  线路组列表
   * @returns
   */
  getList: () => {
    return request({
      url: '/manage/intercity/lineGroup/getList',
      method: 'get'
    })
  },

  /**
   *  更新排序
   * @returns
   */
  updateSort: (data) => {
    return request({
      url: '/manage/intercity/lineGroup/updateSort',
      data,
      method: 'post'
    })
  },
  /**
   *  更新状态
   * @returns
   */
  updateStatus: (data) => {
    return request({
      url: '/manage/intercity/lineGroup/updateStatus',
      data,
      method: 'post'
    })
  },
  /**
   *  删除
   * @returns
   */
  delete: (lineGroupId) => {
    return request({
      url: '/manage/intercity/lineGroup/delete',
      params: { lineGroupId },
      method: 'get'
    })
  },

  /**
   *  获取详细信息
   * @returns
   */
  getInfoById: (lineGroupId) => {
    return request({
      url: '/manage/intercity/lineGroup/getInfoById',
      params: { lineGroupId },
      method: 'get'
    })
  },

  /**
   *  更新
   * @returns
   */
  update: (data) => {
    return request({
      url: '/manage/intercity/lineGroup/update',
      data,
      method: 'post'
    })
  },

  /**
   *  插入
   * @returns
   */
  insert: (data) => {
    return request({
      url: '/manage/intercity/lineGroup/insert',
      data,
      method: 'post'
    })
  },
  /**
   *  线路组列表
   * @returns
   */
  getVehicleTypeListByLineGroupId: (lineGroupId) => {
    return request({
      url: '/manage/intercity/lineGroup/getVehicleTypeListByLineGroupId',
      params:{lineGroupId},
      method: 'get'
    })
  },
}
